package test;

import java.util.concurrent.Callable;

public class MyCallable implements Callable<Integer> {
    private int starte;
    private int end;

    public MyCallable(int start, int end) {
        this.starte = start;
        this.end = end;
    }
    @Override
    public Integer call() throws Exception {
        int result = 0;
        for (; starte <= end; starte++) {
            result += starte;
        }
        return result;
    }
}
